<script setup>
// 3.4 vue 3.4版本以上可以使用
import { ref, defineProps, computed, defineModel } from "vue";

const model = defineModel();
const title = defineModel("title");
console.log("model", model);
console.log("title", title);
const handleClose = () => {
  model.value = false;
  title.value = 0;
};
</script>
<template>
  <el-dialog v-model="model" title="Tips" width="500" :before-close="handleClose">
    <span>title</span>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="model = false">Cancel</el-button>
        <el-button type="primary" @click="model = false"> Confirm </el-button>
      </div>
    </template>
  </el-dialog>
</template>
